using System.Data.Entity;
using System.Reflection;
using Abp.Modules;
using Sky.DispersedDemo.EntityFramework;

namespace Sky.DispersedDemo.Migrator
{
    [DependsOn(typeof(DispersedDemoDataModule))]
    public class DispersedDemoMigratorModule : AbpModule
    {
        public override void PreInitialize()
        {
            Database.SetInitializer<DispersedDemoDbContext>(null);

            Configuration.BackgroundJobs.IsJobExecutionEnabled = false;
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }
    }
}